package com.ws.service.impl;

import com.ws.bean.Carousel;
import com.ws.mapper.CarouselMapper;
import com.ws.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {
    @Autowired
    private CarouselMapper carouselMapper;

    @Override
    public int add(Carousel carousel) {
        return carouselMapper.add(carousel);
    }

    @Override
    public List<Carousel> list() {
        return carouselMapper.list();
    }

    @Override
    public int delete(Integer carouselId) {
        return carouselMapper.delete(carouselId);
    }

    @Override
    public Carousel getCarouselById(Integer carouselId) {
        return carouselMapper.getCarouselById(carouselId);
    }

    @Override
    public int update(Carousel carousel) {
        return carouselMapper.update(carousel);
    }
}
